package com.goodving.guli.bt;

import com.goodving.guli.bt.profile.scale.C0638c;
import com.goodving.guli.bt.profile.scale.GuliLog;
import com.goodving.guli.bt.profile.scale.XMBLEManager;
import com.goodving.guli.bt.profile.scale.C3942j;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by john on 2015/11/25.
 */
public abstract class C1035B implements Runnable {
    private static ExecutorService f5055a = null;
    private static ExecutorService f5056b = null;
    private static ExecutorService f5057c = null;
    public static final int f5058k = 0;
    public static final int f5059l = 1;
    public static final int f5060m = 2;
    public static final int f5061n = 2;
    public static String f5062p;
    protected C0638c f5063o;
    protected C3942j f5064q;

    static {
        f5062p = "BleTask";
        f5055a = Executors.newSingleThreadExecutor();
        f5056b = Executors.newSingleThreadExecutor();
        f5057c = Executors.newFixedThreadPool(5);
    }

    public C1035B(C0638c c0638c) {
        this.f5063o = null;
        this.f5064q = null;
        this.f5063o = c0638c;
        this.f5064q = XMBLEManager.m25149a();
    }

    public C1035B(C3942j c3942j, C0638c c0638c) {
        this.f5063o = null;
        this.f5064q = null;
        this.f5063o = c0638c;
        this.f5064q = c3942j;
    }

    public abstract void m9823a(C0638c c0638c);

    public void m9824f() {
        f5055a.execute(this);
    }

    public void m9825g() {
        f5057c.execute(this);
    }

    public void m9826h() {
        f5056b.execute(this);
    }

    public void run() {
        GuliLog.m12370d(f5062p, "BleTask Run..........................................in:" + getClass().getName());
        if (this.f5064q != null && this.f5064q.m25616v()) {
            m9823a(this.f5063o);
        } else if (this.f5063o != null) {
            this.f5063o.m7918d(Boolean.valueOf(false));
        }
        GuliLog.m12370d(f5062p, "BleTask Run..........................................out:" + getClass().getName());
    }
}

